<?php
	include_once("../../MasterPages/headerPHPScript.php");
	$CourseRegisterService = new CourseRegisterService();
	$CourseID = $_GET["CourseID"];
	$StudentCode = $_GET["StudentCode"];
	$DeleteFlag = ISSET($_GET["DeleteFlag"]) ? $_GET["DeleteFlag"] : "";
	
	if($DeleteFlag!=""){
		$CourseRegisterService->DeleteCourseRegister($CourseID,$StudentCode);
	}else{
		$CourseRegisterService->InsertCourseRegister($CourseID,$StudentCode);
	}
	
	header("location:../index.php?page=student-courseDetail.php");
?>
